package com.chzc.util.enums;

/**
 * @author cv大魔王
 * @version 1.0
 * @date 2021/5/19 14:37
 */
public enum StatusCode {

    ERROR(-1, "未知错误"),

    SUCCESS(20000, "成功"),

    ADD_SUCCESS(20000, "添加成功"),

    DELETE_SUCCESS(20000, "刪除成功"),

    EDIT_SUCCESS(20000, "修改成功"),

    OSS_SUCCESS(20000, "上传成功"),

    QUERY_SUCCESS(20000, "查询成功"),

    LOGOUT_SUCCESS(20000, "退出成功"),

    PARAM_ERROR(20001, "参数不合法"),

    DATABASE_ERROR(20002, "数据库异常"),

    COMPETENCE_ERROR(20007, "权限不足"),

    GOODS_ERROR(20003, "删除失败，该分类下仍有商品无法删除"),

    LOGIN_ERROR(20004, "账号或密码错误"),

    JWT_DATA(20006, "登录过期，请重新登录"),

    JWT_LOGIN_FAIL(20011, "登录失败"),

    REGISTER_FAIL(20012, "该用户已注册"),

    JWT_LOGIN_SUCCESS(20000, "登录成功"),

    KILL_FAIL(30001, "该商品已售空"),

    KILL_START_DATE_FAIL(30002, "秒杀活动未开始，请耐心等待"),

    KILL_END_DATE_FAIL(30003, "秒杀活动已结束，下次早点来哦"),

    KILL_FULL_FAIL(30004, "该商品不可重复抢购"),


    JWT_NULL(20005, "请先登录");

    private Integer code;
    private String message;

    StatusCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}
